<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>coolMeeting</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="/css/font.css">
    <link rel="stylesheet" href="/css/xadmin.css">
    <link rel="stylesheet" href="/styles/common.css"/>
    <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
    <script src="/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script>
        // 是否开启刷新记忆tab功能
        // var is_remember = false;
    </script>
    </head>
    <body>
    <#--    导航栏-->
    <#include 'top.ftl'>
        <div class="page-body">
            <#--            左侧导航栏-->
            <#include 'leftMenu.ftl'>
            <div class="page-content">
                <div class="content-nav">
                    人员管理 > 员工注册
                </div>
                <form action="/doReg" method="post">
                    <fieldset>
                        <legend>员工信息</legend>
                        <div style="color: green">${success!''}</div>
                        <div style="color: red">${error!''}</div>
                        <table class="formtable" style="width:50%">
                            <tr>
                                <td>姓名：</td>
                                <td>
                                    <input required type="text" name="employeename" value="<#if employee??>${employee.employeename}</#if>" id="employeename" maxlength="20"/>
                                </td>
                            </tr>
                            <tr>
                                <td>账户名：</td>
                                <td>
                                    <input required type="text" name="username" value="<#if employee??>${employee.username}</#if>" id="accountname" maxlength="20" />
                                </td>
                            </tr>
                            <tr>
                                <td>密码：</td>
                                <td>
                                    <input required type="password" name="password" id="password" minlength="6" maxlength="20" placeholder="请输入6位以上的密码" />
                                </td>
                            </tr>
                            <tr>
                                <td>确认密码：</td>
                                <td>
                                    <input required type="password" id="confirm" maxlength="20" onchange="check()"/>
                                    <div id="confirmInfo" style="color: red"></div>
                                </td>
                            </tr>
                            <tr>
                                <td>联系电话：</td>
                                <td>
                                    <input required type="text" name="phone"  value="<#if employee??>${employee.phone}</#if>" id="phone" maxlength="20"/>
                                </td>
                            </tr>
                            <tr>
                                <td>电子邮件：</td>
                                <td>
                                    <input required type="text" name="email" value="<#if employee??>${employee.email}</#if>" id="email" maxlength="20"/>
                                </td>
                            </tr>
							<td>所在部门：</td>
                                <td>
                                    <select style="font-size: 14px;color: #666" required name="departmentid">
                                        <#if deps??>
                                            <#list deps as dep>
                                                <option value="${dep.departmentid}">${dep.departmentname}</option>
                                            </#list>
                                        </#if>
                                     </select>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="6" class="command">
                                    <input type="submit" class="clickbutton" value="注册"/>
                                    <input type="reset" class="clickbutton" value="重置"/>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </form>
            </div>
        </div>
        <div class="page-footer">
            <hr/>
            更多问题，欢迎联系<a href="mailto:webmaster@eeg.com">管理员</a>
            <img src="/images/footer.png" alt="CoolMeeting"/>
        </div>
    <script>
        function check() {
            var password = document.getElementById("password");
            var confirm =document.getElementById("confirm");
            var confirmInfo = document.getElementById("confirmInfo");
            if(password.value != confirm.value){
                confirmInfo.innerHTML='两次输入密码不一致';
            }else {
                confirmInfo.innerHTML='';
            }
        }
    </script>
    </body>
</html>